﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace DevExpress.GridControl
{
    public class Person
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public int Age { get; set; }

        public string Gender { get; set; } = "男";

        public DateTime Birthday { get; set; }
    }

    public static class PersonFactory
    {
        public static List<Person> Create(int count = 1000)
        {
            return Enumerable.Range(1, count).Select(i =>
            {
                var key = 20;
                return new Person
                {
                    Id = count * key + i,
                    Name = $"学生{i}",
                    Age = key,
                    Birthday = DateTime.Now.AddYears(-key),
                    Gender = i % 3 == 0?"女":"男",
                };
            }).ToList();
        }
    }
}
